﻿namespace TetrisProject.GameObjects
{
    using System;

    public struct MatrixCoords
    {
        public MatrixCoords(int x, int y)
            : this()
        {
            this.X = x;
            this.Y = y;
        }

        public int X { get; set; }

        public int Y { get; set; }

        public static MatrixCoords operator +(MatrixCoords a, MatrixCoords b)
        {
            return new MatrixCoords(a.X + b.X, a.Y + b.Y);
        }

        public static MatrixCoords operator -(MatrixCoords a, MatrixCoords b)
        {
            return new MatrixCoords(a.X - b.X, a.Y - b.Y);
        }

        public override string ToString()
        {
            return string.Format("[{0} {1}]", this.X, this.Y);
        }
    }
}
